home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BCI NET
/
BCI NET Dec 94.iso
/
archives
/
applications
/
wp
/
macro.lha
/
Macro
/
AUGFL
/
UUInsert.ged
< prev
next >
Wrap
Text File
|
1994-07-03
|
2KB
|
83 lines
/************************************************************
UUInsert written by Francois Helsen and Lieven Lema
for use with GoldEd
No need to check for compression anymore
Install as 'UUWrite...' in the ARexx menu.
First release
UUInsert.ged 1.0 (20.04.94)
LHA-routine added
UUInsert.ged 1.01 (22.04.94)
UUInsert.ged 1.1 (23.04.94)
name routine added
UUInsert.ged 1.2 (23.04.94)
UUInsert.ged 1.3 (24.04.94)
Minor bugfix: DO without END
$VER: UUInsert.ged 1.31 (02.07.94)
************************************************************/
OPTIONS RESULTS /* enable return codes */
'LOCK CURRENT' /* lock GUI, gain access */
OPTIONS FAILAT 6 /* ignore warnings */
SIGNAL ON SYNTAX /* ensure clean exit */
'REQUEST FILE TITLE "File to UUEncode" PATH Mail:OutBound/'
filename = result
if rc ~= 5 then do
filepart = fp(filename)
if right(filename,4)~='.lha' then call Archive /* File-extension ~ .lha */
if right(filename,4)=='.lha' then call Coding /* File-extension = .lha */
Archive:
'REQUEST TITLE "Archive" BODY "No LhA-file, I shall fix this ;-)"'
address command
'Lha -q -y a' "T:" || filepart '"' || filename || '"'
UUEncode '>T:CodeFile' "T:" || filepart || ".lha" '"' || filepart || .lha'"'
address GOLDED.1 'open insert T:CodeFile'
'Delete >NIL: T:CodeFile'
'Delete >NIL:' "T:" || filepart || ".lha"
call UNL
Coding:
address command
UUEncode '>T:CodeFile' '"' || filename || '"' '"' || filepart || '"'
address GOLDED.1 'open insert T:CodeFile'
'Delete >NIL: T:CodeFile'
call UNL
end
UNL:
address GOLDED.1 'UNLOCK' /* VERY IMPORTANT: UNLOCK GUI */
EXIT
SYNTAX:
SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
'UNLOCK'
EXIT
/* ------------- GIVEN A FILENAME, RETURN THE FILEPART --------------- */
fp:
parse arg filename
return right(filename, length(filename) - max(lastpos("/", filename),lastpos(":", filename)))